<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="language" content="en" />
        <link href="./assets/ffd55088/css/bootstrap.css" rel="stylesheet">
<link href="./assets/5cf9384a/solarized_light.css" rel="stylesheet">
<link href="./assets/6c54116e/style.css" rel="stylesheet">
<script src="./assets/a44cef0f/jquery.js"></script>
<script src="./assets/ffd55088/js/bootstrap.js"></script>
<script src="./assets/8ac4e28a/jssearch.js"></script>    <title>Connection, yii\sphinx\Connection - Yii Framework 2.0 API Documentation</title>
</head>
<body>

<div class="wrap">
    <nav id="w12043" class="navbar-inverse navbar-fixed-top navbar" role="navigation"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w12043-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="./index.html">Yii Framework 2.0 API Documentation</a></div><div id="w12043-collapse" class="collapse navbar-collapse"><ul id="w12044" class="navbar-nav nav"><li><a href="./index.html">Class reference</a></li>
<li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown">Extensions <b class="caret"></b></a><ul id="w12045" class="dropdown-menu"><li><a href="./ext-apidoc-index.html" tabindex="-1">apidoc</a></li>
<li><a href="./ext-authclient-index.html" tabindex="-1">authclient</a></li>
<li><a href="./ext-bootstrap-index.html" tabindex="-1">bootstrap</a></li>
<li><a href="./ext-codeception-index.html" tabindex="-1">codeception</a></li>
<li><a href="./ext-debug-index.html" tabindex="-1">debug</a></li>
<li><a href="./ext-elasticsearch-index.html" tabindex="-1">elasticsearch</a></li>
<li><a href="./ext-faker-index.html" tabindex="-1">faker</a></li>
<li><a href="./ext-gii-index.html" tabindex="-1">gii</a></li>
<li><a href="./ext-imagine-index.html" tabindex="-1">imagine</a></li>
<li><a href="./ext-jui-index.html" tabindex="-1">jui</a></li>
<li><a href="./ext-mongodb-index.html" tabindex="-1">mongodb</a></li>
<li><a href="./ext-redis-index.html" tabindex="-1">redis</a></li>
<li><a href="./ext-smarty-index.html" tabindex="-1">smarty</a></li>
<li><a href="./ext-sphinx-index.html" tabindex="-1">sphinx</a></li>
<li><a href="./ext-swiftmailer-index.html" tabindex="-1">swiftmailer</a></li>
<li><a href="./ext-twig-index.html" tabindex="-1">twig</a></li></ul></li>
<li><a href="./guide-README.html">Guide</a></li></ul><div class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input id="searchbox" type="text" class="form-control" placeholder="Search">
  </div>
</div>
</div></nav>
    <div id="search-resultbox" style="display: none;" class="modal-content">
        <ul id="search-results">
        </ul>
    </div>

    
<div class="row">
    <div class="col-md-3">
                <div id="navigation" class="list-group"><a class="list-group-item active" href="#navigation-12041" data-toggle="collapse" data-parent="#navigation">yii\sphinx <b class="caret"></b></a><div id="navigation-12041" class="submenu panel-collapse collapse in"><a class="list-group-item" href="./yii-sphinx-activedataprovider.html">ActiveDataProvider</a>
<a class="list-group-item" href="./yii-sphinx-activefixture.html">ActiveFixture</a>
<a class="list-group-item" href="./yii-sphinx-activequery.html">ActiveQuery</a>
<a class="list-group-item" href="./yii-sphinx-activerecord.html">ActiveRecord</a>
<a class="list-group-item" href="./yii-sphinx-columnschema.html">ColumnSchema</a>
<a class="list-group-item" href="./yii-sphinx-command.html">Command</a>
<a class="list-group-item active" href="./yii-sphinx-connection.html">Connection</a>
<a class="list-group-item" href="./yii-sphinx-indexschema.html">IndexSchema</a>
<a class="list-group-item" href="./yii-sphinx-query.html">Query</a>
<a class="list-group-item" href="./yii-sphinx-querybuilder.html">QueryBuilder</a>
<a class="list-group-item" href="./yii-sphinx-schema.html">Schema</a></div>
<a class="list-group-item" href="#navigation-12042" data-toggle="collapse" data-parent="#navigation">yii\sphinx\gii\model <b class="caret"></b></a><div id="navigation-12042" class="submenu panel-collapse collapse"><a class="list-group-item" href="./yii-sphinx-gii-model-generator.html">Generator</a></div></div>    </div>
    <div class="col-md-9 api-content" role="main">
        <h1>Class yii\sphinx\Connection</h1>
<div class="top-nav">
    <a href="index.html">All Classes</a>
            | <a href="#properties">Properties</a>
                | <a href="#methods">Methods</a>
                | <a href="#events">Events</a>
        </div>

<table class="summaryTable docClass table table-bordered">
    <colgroup>
        <col class="col-name" />
        <col class="col-value" />
    </colgroup>
            <tr><th>Inheritance</th><td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a> &raquo;
<a href="yii-db-connection.html">yii\db\Connection</a> &raquo;
<a href="yii-base-component.html">yii\base\Component</a> &raquo;
<a href="yii-base-object.html">yii\base\Object</a></td></tr>
                <tr><th>Implements</th><td><a href="yii-base-configurable.html">yii\base\Configurable</a></td></tr>
                                    <tr><th>Available since version</th><td>2.0</td></tr>
                    <tr>
          <th>Source Code</th>
          <td><a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php">https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php</a></td>
        </tr>
    </table>

<div class="class-description">
    <p><strong>Connection represents the Sphinx connection via MySQL protocol.</strong></p>
    <p>This class uses <a href="http://www.php.net/manual/en/ref.pdo.php">PDO</a> to maintain such connection.
Note: although PDO supports numerous database drivers, this class supports only MySQL.</p>
<p>In order to setup Sphinx "searchd" to support MySQL protocol following configuration should be added:</p>
<pre><code class="hljs nginx"><span class="hljs-title">searchd</span>
{
    <span class="hljs-title">listen</span> = localhost:<span class="hljs-number">9306</span>:mysql41
    ...
}
</code></pre>
<p>The following example shows how to create a Connection instance and establish
the Sphinx connection:</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$connection</span> = <span class="hljs-keyword">new</span> \yii\db\Connection([
    <span class="hljs-string">'dsn'</span> =&gt; <span class="hljs-string">'mysql:host=127.0.0.1;port=9306;'</span>,
    <span class="hljs-string">'username'</span> =&gt; <span class="hljs-variable">$username</span>,
    <span class="hljs-string">'password'</span> =&gt; <span class="hljs-variable">$password</span>,
]);
<span class="hljs-variable">$connection</span>-&gt;open();
</code></pre>
<p>After the Sphinx connection is established, one can execute SQL statements like the following:</p>
<pre><code class="hljs php language-php"><span class="hljs-variable">$command</span> = <span class="hljs-variable">$connection</span>-&gt;createCommand(<span class="hljs-string">"SELECT * FROM idx_article WHERE MATCH('programming')"</span>);
<span class="hljs-variable">$articles</span> = <span class="hljs-variable">$command</span>-&gt;queryAll();
<span class="hljs-variable">$command</span> = <span class="hljs-variable">$connection</span>-&gt;createCommand(<span class="hljs-string">'UPDATE idx_article SET status=2 WHERE id=1'</span>);
<span class="hljs-variable">$command</span>-&gt;execute();
</code></pre>
<p>For more information about how to perform various DB queries, please refer to <a href="yii-sphinx-command.html">yii\sphinx\Command</a>.</p>
<p>This class supports transactions exactly as "yii\db\Connection".</p>
<p>Note: while this class extends "yii\db\Connection" some of its methods are not supported.</p>

    </div>

<a id="properties"></a>

<div class="summary doc-property">
<h2>Public Properties</h2>

<p><a href="#" class="toggle">Hide inherited properties</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-property" />
    <col class="col-type" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Property</th><th>Type</th><th>Description</th><th>Defined By</th>
</tr>
        <tr class="inherited" id="$attributes">
        <td><a href="yii-db-connection.html#$attributes-detail">$attributes</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>PDO attributes (name =&gt; value) that should be set when calling <a href="yii-db-connection.html#open()-detail">open()</a>
to establish a DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$behaviors">
        <td><a href="yii-base-component.html#$behaviors-detail">$behaviors</a></td>
        <td><a href="yii-base-behavior.html">yii\base\Behavior</a>[]</td>
        <td>List of behaviors attached to this component</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="$charset">
        <td><a href="yii-db-connection.html#$charset-detail">$charset</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The charset used for database connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$commandClass">
        <td><a href="yii-db-connection.html#$commandClass-detail">$commandClass</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The class used to create new database <a href="yii-db-command.html">yii\db\Command</a> objects.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$driverName">
        <td><a href="yii-db-connection.html#$driverName-detail">$driverName</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>Name of the DB driver</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$dsn">
        <td><a href="yii-db-connection.html#$dsn-detail">$dsn</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The Data Source Name, or DSN, contains the information required to connect to the database.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$emulatePrepare">
        <td><a href="yii-db-connection.html#$emulatePrepare-detail">$emulatePrepare</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether to turn on prepare emulation.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$enableQueryCache">
        <td><a href="yii-db-connection.html#$enableQueryCache-detail">$enableQueryCache</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether to enable query caching.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$enableSavepoint">
        <td><a href="yii-db-connection.html#$enableSavepoint-detail">$enableSavepoint</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether to enable [savepoint](<a href="http://en">http://en</a>.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$enableSchemaCache">
        <td><a href="yii-db-connection.html#$enableSchemaCache-detail">$enableSchemaCache</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether to enable schema caching.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$enableSlaves">
        <td><a href="yii-db-connection.html#$enableSlaves-detail">$enableSlaves</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether to enable read/write splitting by using <a href="yii-db-connection.html#$slaves-detail">$slaves</a> to read data.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$isActive">
        <td><a href="yii-db-connection.html#$isActive-detail">$isActive</a></td>
        <td><a href="http://www.php.net/language.types.boolean">boolean</a></td>
        <td>Whether the DB connection is established</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="$lastInsertID">
        <td><a href="yii-sphinx-connection.html#$lastInsertID-detail">$lastInsertID</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The row ID of the last row inserted, or the last value retrieved from the sequence object</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="$masterConfig">
        <td><a href="yii-db-connection.html#$masterConfig-detail">$masterConfig</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>The configuration that should be merged with every master configuration listed in <a href="yii-db-connection.html#$masters-detail">$masters</a>.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$masterPdo">
        <td><a href="yii-db-connection.html#$masterPdo-detail">$masterPdo</a></td>
        <td><a href="http://www.php.net/class.pdo">PDO</a></td>
        <td>The PDO instance for the currently active master connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$masters">
        <td><a href="yii-db-connection.html#$masters-detail">$masters</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>List of master connection configurations.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$password">
        <td><a href="yii-db-connection.html#$password-detail">$password</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The password for establishing DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$pdo">
        <td><a href="yii-db-connection.html#$pdo-detail">$pdo</a></td>
        <td><a href="http://www.php.net/class.pdo">PDO</a></td>
        <td>The PHP PDO instance associated with this DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$pdoClass">
        <td><a href="yii-db-connection.html#$pdoClass-detail">$pdoClass</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>Custom PDO wrapper class.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$queryBuilder">
        <td><a href="yii-db-connection.html#$queryBuilder-detail">$queryBuilder</a></td>
        <td><a href="yii-db-querybuilder.html">yii\db\QueryBuilder</a></td>
        <td>The query builder for the current DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$queryCache">
        <td><a href="yii-db-connection.html#$queryCache-detail">$queryCache</a></td>
        <td><a href="yii-caching-cache.html">yii\caching\Cache</a>|<a href="http://www.php.net/language.types.string">string</a></td>
        <td>The cache object or the ID of the cache application component
that is used for query caching.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$queryCacheDuration">
        <td><a href="yii-db-connection.html#$queryCacheDuration-detail">$queryCacheDuration</a></td>
        <td><a href="http://www.php.net/language.types.integer">integer</a></td>
        <td>The default number of seconds that query results can remain valid in cache.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$schema">
        <td><a href="yii-db-connection.html#$schema-detail">$schema</a></td>
        <td><a href="yii-db-schema.html">yii\db\Schema</a></td>
        <td>The schema information for the database opened by this connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$schemaCache">
        <td><a href="yii-db-connection.html#$schemaCache-detail">$schemaCache</a></td>
        <td><a href="yii-caching-cache.html">yii\caching\Cache</a>|<a href="http://www.php.net/language.types.string">string</a></td>
        <td>The cache object or the ID of the cache application component that
is used to cache the table metadata.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$schemaCacheDuration">
        <td><a href="yii-db-connection.html#$schemaCacheDuration-detail">$schemaCacheDuration</a></td>
        <td><a href="http://www.php.net/language.types.integer">integer</a></td>
        <td>Number of seconds that table metadata can remain valid in cache.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$schemaCacheExclude">
        <td><a href="yii-db-connection.html#$schemaCacheExclude-detail">$schemaCacheExclude</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>List of tables whose metadata should NOT be cached.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="$schemaMap">
        <td><a href="yii-sphinx-connection.html#$schemaMap-detail">$schemaMap</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>Mapping between PDO driver names and <a href="yii-sphinx-schema.html">yii\sphinx\Schema</a> classes.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="$serverRetryInterval">
        <td><a href="yii-db-connection.html#$serverRetryInterval-detail">$serverRetryInterval</a></td>
        <td><a href="http://www.php.net/language.types.integer">integer</a></td>
        <td>The retry interval in seconds for dead servers listed in <a href="yii-db-connection.html#$masters-detail">$masters</a> and <a href="yii-db-connection.html#$slaves-detail">$slaves</a>.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$serverStatusCache">
        <td><a href="yii-db-connection.html#$serverStatusCache-detail">$serverStatusCache</a></td>
        <td><a href="yii-caching-cache.html">yii\caching\Cache</a>|<a href="http://www.php.net/language.types.string">string</a></td>
        <td>The cache object or the ID of the cache application component that is used to store
the health status of the DB servers specified in <a href="yii-db-connection.html#$masters-detail">$masters</a> and <a href="yii-db-connection.html#$slaves-detail">$slaves</a>.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$slave">
        <td><a href="yii-db-connection.html#$slave-detail">$slave</a></td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
        <td>The currently active slave connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$slaveConfig">
        <td><a href="yii-db-connection.html#$slaveConfig-detail">$slaveConfig</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>The configuration that should be merged with every slave configuration listed in <a href="yii-db-connection.html#$slaves-detail">$slaves</a>.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$slavePdo">
        <td><a href="yii-db-connection.html#$slavePdo-detail">$slavePdo</a></td>
        <td><a href="http://www.php.net/class.pdo">PDO</a></td>
        <td>The PDO instance for the currently active slave connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$slaves">
        <td><a href="yii-db-connection.html#$slaves-detail">$slaves</a></td>
        <td><a href="http://www.php.net/language.types.array">array</a></td>
        <td>List of slave connection configurations.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$tablePrefix">
        <td><a href="yii-db-connection.html#$tablePrefix-detail">$tablePrefix</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The common prefix or suffix for table names.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$transaction">
        <td><a href="yii-db-connection.html#$transaction-detail">$transaction</a></td>
        <td><a href="yii-db-transaction.html">yii\db\Transaction</a></td>
        <td>The currently active transaction.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="$username">
        <td><a href="yii-db-connection.html#$username-detail">$username</a></td>
        <td><a href="http://www.php.net/language.types.string">string</a></td>
        <td>The username for establishing DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
    </table>
</div>

<a id="methods"></a>

<div class="summary doc-method">
<h2>Public Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
        <tr class="inherited" id="__call()">
        <td><a href="yii-base-component.html#__call()-detail">__call()</a></td>
        <td>Calls the named method which is not a class method.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__clone()">
        <td><a href="yii-base-component.html#__clone()-detail">__clone()</a></td>
        <td>This method is called after the object is created by cloning an existing one.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__construct()">
        <td><a href="yii-base-object.html#__construct()-detail">__construct()</a></td>
        <td>Constructor.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
            <tr class="inherited" id="__get()">
        <td><a href="yii-base-component.html#__get()-detail">__get()</a></td>
        <td>Returns the value of a component property.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__isset()">
        <td><a href="yii-base-component.html#__isset()-detail">__isset()</a></td>
        <td>Checks if a property is set, i.e. defined and not null.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__set()">
        <td><a href="yii-base-component.html#__set()-detail">__set()</a></td>
        <td>Sets the value of a component property.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="__sleep()">
        <td><a href="yii-db-connection.html#__sleep()-detail">__sleep()</a></td>
        <td>Close the connection before serializing.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="__unset()">
        <td><a href="yii-base-component.html#__unset()-detail">__unset()</a></td>
        <td>Sets a component property to be null.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="attachBehavior()">
        <td><a href="yii-base-component.html#attachBehavior()-detail">attachBehavior()</a></td>
        <td>Attaches a behavior to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="attachBehaviors()">
        <td><a href="yii-base-component.html#attachBehaviors()-detail">attachBehaviors()</a></td>
        <td>Attaches a list of behaviors to the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="beginTransaction()">
        <td><a href="yii-db-connection.html#beginTransaction()-detail">beginTransaction()</a></td>
        <td>Starts a transaction.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="behaviors()">
        <td><a href="yii-base-component.html#behaviors()-detail">behaviors()</a></td>
        <td>Returns a list of behaviors that this component should behave as.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="cache()">
        <td><a href="yii-db-connection.html#cache()-detail">cache()</a></td>
        <td>Uses query cache for the queries performed with the callable.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="canGetProperty()">
        <td><a href="yii-base-component.html#canGetProperty()-detail">canGetProperty()</a></td>
        <td>Returns a value indicating whether a property can be read.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="canSetProperty()">
        <td><a href="yii-base-component.html#canSetProperty()-detail">canSetProperty()</a></td>
        <td>Returns a value indicating whether a property can be set.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="className()">
        <td><a href="yii-base-object.html#className()-detail">className()</a></td>
        <td>Returns the fully qualified name of this class.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
            <tr class="inherited" id="close()">
        <td><a href="yii-db-connection.html#close()-detail">close()</a></td>
        <td>Closes the currently active DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="createCommand()">
        <td><a href="yii-sphinx-connection.html#createCommand()-detail">createCommand()</a></td>
        <td>Creates a command for execution.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
                <tr class="inherited" id="detachBehavior()">
        <td><a href="yii-base-component.html#detachBehavior()-detail">detachBehavior()</a></td>
        <td>Detaches a behavior from the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="detachBehaviors()">
        <td><a href="yii-base-component.html#detachBehaviors()-detail">detachBehaviors()</a></td>
        <td>Detaches all behaviors from the component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="ensureBehaviors()">
        <td><a href="yii-base-component.html#ensureBehaviors()-detail">ensureBehaviors()</a></td>
        <td>Makes sure that the behaviors declared in <a href="yii-base-component.html#behaviors()-detail">behaviors()</a> are attached to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr id="escapeMatchValue()">
        <td><a href="yii-sphinx-connection.html#escapeMatchValue()-detail">escapeMatchValue()</a></td>
        <td>Escapes all special characters from 'MATCH' statement argument.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="getBehavior()">
        <td><a href="yii-base-component.html#getBehavior()-detail">getBehavior()</a></td>
        <td>Returns the named behavior object.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="getBehaviors()">
        <td><a href="yii-base-component.html#getBehaviors()-detail">getBehaviors()</a></td>
        <td>Returns all behaviors attached to this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="getDriverName()">
        <td><a href="yii-db-connection.html#getDriverName()-detail">getDriverName()</a></td>
        <td>Returns the name of the DB driver. Based on the the current <a href="yii-db-connection.html#$dsn-detail">$dsn</a>, in case it was not set explicitly
by an end user.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="getIndexSchema()">
        <td><a href="yii-sphinx-connection.html#getIndexSchema()-detail">getIndexSchema()</a></td>
        <td>Obtains the schema information for the named index.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="getIsActive()">
        <td><a href="yii-db-connection.html#getIsActive()-detail">getIsActive()</a></td>
        <td>Returns a value indicating whether the DB connection is established.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="getLastInsertID()">
        <td><a href="yii-sphinx-connection.html#getLastInsertID()-detail">getLastInsertID()</a></td>
        <td>This method is not supported by Sphinx.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="getMasterPdo()">
        <td><a href="yii-db-connection.html#getMasterPdo()-detail">getMasterPdo()</a></td>
        <td>Returns the PDO instance for the currently active master connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getQueryBuilder()">
        <td><a href="yii-db-connection.html#getQueryBuilder()-detail">getQueryBuilder()</a></td>
        <td>Returns the query builder for the current DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getQueryCacheInfo()">
        <td><a href="yii-db-connection.html#getQueryCacheInfo()-detail">getQueryCacheInfo()</a></td>
        <td>Returns the current query cache information.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getSchema()">
        <td><a href="yii-db-connection.html#getSchema()-detail">getSchema()</a></td>
        <td>Returns the schema information for the database opened by this connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getSlave()">
        <td><a href="yii-db-connection.html#getSlave()-detail">getSlave()</a></td>
        <td>Returns the currently active slave connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getSlavePdo()">
        <td><a href="yii-db-connection.html#getSlavePdo()-detail">getSlavePdo()</a></td>
        <td>Returns the PDO instance for the currently active slave connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getTableSchema()">
        <td><a href="yii-db-connection.html#getTableSchema()-detail">getTableSchema()</a></td>
        <td>Obtains the schema information for the named table.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="getTransaction()">
        <td><a href="yii-db-connection.html#getTransaction()-detail">getTransaction()</a></td>
        <td>Returns the currently active transaction.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="hasEventHandlers()">
        <td><a href="yii-base-component.html#hasEventHandlers()-detail">hasEventHandlers()</a></td>
        <td>Returns a value indicating whether there is any handler attached to the named event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="hasMethod()">
        <td><a href="yii-base-component.html#hasMethod()-detail">hasMethod()</a></td>
        <td>Returns a value indicating whether a method is defined.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="hasProperty()">
        <td><a href="yii-base-component.html#hasProperty()-detail">hasProperty()</a></td>
        <td>Returns a value indicating whether a property is defined for this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="init()">
        <td><a href="yii-base-object.html#init()-detail">init()</a></td>
        <td>Initializes the object.</td>
        <td><a href="yii-base-object.html">yii\base\Object</a></td>
    </tr>
                <tr class="inherited" id="noCache()">
        <td><a href="yii-db-connection.html#noCache()-detail">noCache()</a></td>
        <td>Disables query cache temporarily.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="off()">
        <td><a href="yii-base-component.html#off()-detail">off()</a></td>
        <td>Detaches an existing event handler from this component.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="on()">
        <td><a href="yii-base-component.html#on()-detail">on()</a></td>
        <td>Attaches an event handler to an event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="open()">
        <td><a href="yii-db-connection.html#open()-detail">open()</a></td>
        <td>Establishes a DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
                <tr class="inherited" id="quoteColumnName()">
        <td><a href="yii-db-connection.html#quoteColumnName()-detail">quoteColumnName()</a></td>
        <td>Quotes a column name for use in a query.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="quoteIndexName()">
        <td><a href="yii-sphinx-connection.html#quoteIndexName()-detail">quoteIndexName()</a></td>
        <td>Quotes a index name for use in a query.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="quoteSql()">
        <td><a href="yii-db-connection.html#quoteSql()-detail">quoteSql()</a></td>
        <td>Processes a SQL statement by quoting table and column names that are enclosed within double brackets.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr id="quoteTableName()">
        <td><a href="yii-sphinx-connection.html#quoteTableName()-detail">quoteTableName()</a></td>
        <td>Alias of <a href="yii-sphinx-connection.html#quoteIndexName()-detail">quoteIndexName()</a>.</td>
        <td><a href="yii-sphinx-connection.html">yii\sphinx\Connection</a></td>
    </tr>
            <tr class="inherited" id="quoteValue()">
        <td><a href="yii-db-connection.html#quoteValue()-detail">quoteValue()</a></td>
        <td>Quotes a string value for use in a query.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="setDriverName()">
        <td><a href="yii-db-connection.html#setDriverName()-detail">setDriverName()</a></td>
        <td>Changes the current driver name.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="transaction()">
        <td><a href="yii-db-connection.html#transaction()-detail">transaction()</a></td>
        <td>Executes callback provided in a transaction.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
            <tr class="inherited" id="trigger()">
        <td><a href="yii-base-component.html#trigger()-detail">trigger()</a></td>
        <td>Triggers an event.</td>
        <td><a href="yii-base-component.html">yii\base\Component</a></td>
    </tr>
            <tr class="inherited" id="useMaster()">
        <td><a href="yii-db-connection.html#useMaster()-detail">useMaster()</a></td>
        <td>Executes the provided callback by using the master connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
    </table>
</div>

<div class="summary doc-method">
<h2>Protected Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summary-table table table-striped table-bordered table-hover">
<colgroup>
    <col class="col-method" />
    <col class="col-description" />
    <col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
                                                                                <tr class="inherited" id="createPdoInstance()">
        <td><a href="yii-db-connection.html#createPdoInstance()-detail">createPdoInstance()</a></td>
        <td>Creates the PDO instance.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
                                                                                                    <tr class="inherited" id="initConnection()">
        <td><a href="yii-db-connection.html#initConnection()-detail">initConnection()</a></td>
        <td>Initializes the DB connection.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
                            <tr class="inherited" id="openFromPool()">
        <td><a href="yii-db-connection.html#openFromPool()-detail">openFromPool()</a></td>
        <td>Opens the connection to a server in the pool.</td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
                                        </table>
</div>

<a id="events"></a>
<div class="summary doc-event">
    <h2>Events</h2>

    <p><a href="#" class="toggle">Hide inherited events</a></p>

    <table class="summary-table table table-striped table-bordered table-hover">
    <colgroup>
        <col class="col-event" />
        <col class="col-type" />
        <col class="col-description" />
        <col class="col-defined" />
    </colgroup>
    <tr>
        <th>Event</th><th>Type</th><th>Description</th><th>Defined By</th>
    </tr>
        <tr class="inherited" id="EVENT_AFTER_OPEN">
        <td><a href="yii-db-connection.html#EVENT_AFTER_OPEN-detail">EVENT_AFTER_OPEN</a></td>
        <td>\yii\db\Event</td>
        <td>
            An event that is triggered after a DB connection is established                    </td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
        <tr class="inherited" id="EVENT_BEGIN_TRANSACTION">
        <td><a href="yii-db-connection.html#EVENT_BEGIN_TRANSACTION-detail">EVENT_BEGIN_TRANSACTION</a></td>
        <td>\yii\db\Event</td>
        <td>
            An event that is triggered right before a top-level transaction is started                    </td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
        <tr class="inherited" id="EVENT_COMMIT_TRANSACTION">
        <td><a href="yii-db-connection.html#EVENT_COMMIT_TRANSACTION-detail">EVENT_COMMIT_TRANSACTION</a></td>
        <td>\yii\db\Event</td>
        <td>
            An event that is triggered right after a top-level transaction is committed                    </td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
        <tr class="inherited" id="EVENT_ROLLBACK_TRANSACTION">
        <td><a href="yii-db-connection.html#EVENT_ROLLBACK_TRANSACTION-detail">EVENT_ROLLBACK_TRANSACTION</a></td>
        <td>\yii\db\Event</td>
        <td>
            An event that is triggered right after a top-level transaction is rolled back                    </td>
        <td><a href="yii-db-connection.html">yii\db\Connection</a></td>
    </tr>
        </table>
</div>

<a id="constants"></a>

<h2>Property Details</h2>

<div class="property-doc">

    <div class="detail-header h3" id="$lastInsertID-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#$lastInsertID-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $lastInsertID        <span class="detail-header-tag small">
            public                         <em>read-only</em>                         property
                    </span>
    </div>

    <div class="doc-description">
        <p>The row ID of the last row inserted, or the last value retrieved from the sequence object</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-sphinx-connection.html#getLastInsertID()-detail">getLastInsertID</a></strong> ( <span style="color: #0000BB">$sequenceName&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span> )</div>


    <div class="detail-header h3" id="$schemaMap-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#$schemaMap-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L68" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L68" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        $schemaMap        <span class="detail-header-tag small">
            public                                                property
                    </span>
    </div>

    <div class="doc-description">
        <p>Mapping between PDO driver names and <a href="yii-sphinx-schema.html">yii\sphinx\Schema</a> classes.
The keys of the array are PDO driver names while the values the corresponding
schema class name or configuration. Please refer to <span class="broken-link">\yii\sphinx\Yii::createObject()</span> for
details on how to specify a configuration.</p>
<p>This property is mainly used by <a href="yii-db-connection.html#getSchema()-detail">getSchema()</a> when fetching the database schema information.
You normally do not need to set this property unless you want to use your own
<a href="yii-sphinx-schema.html">yii\sphinx\Schema</a> class to support DBMS that is not supported by Yii.</p>
<p>Mapping between PDO driver names and <a href="yii-sphinx-schema.html">yii\sphinx\Schema</a> classes.
The keys of the array are PDO driver names while the values the corresponding
schema class name or configuration. Please refer to <span class="broken-link">\yii\sphinx\Yii::createObject()</span> for
details on how to specify a configuration.</p>
<p>This property is mainly used by <a href="yii-db-connection.html#getSchema()-detail">getSchema()</a> when fetching the database schema information.
You normally do not need to set this property unless you want to use your own
<a href="yii-sphinx-schema.html">yii\sphinx\Schema</a> class to support DBMS that is not supported by Yii.</p>

            </div>

    <div class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.array">array</a></span> <a href="yii-sphinx-connection.html#$schemaMap-detail">$schemaMap</a> <span style="color: #0000BB"></span><span style="color: #007700">=&nbsp;[</span><span style="color: #DD0000">'mysqli'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'yii\sphinx\Schema'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'mysql'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'yii\sphinx\Schema'</span><span style="color: #007700">]</span></div>

</div>
<h2>Method Details</h2>

<div class="method-doc">

    <div class="detail-header h3" id="createCommand()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#createCommand()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L114" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L114" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        createCommand()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Creates a command for execution.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-sphinx-command.html">yii\sphinx\Command</a></span> <strong><a href="yii-sphinx-connection.html#createCommand()-detail">createCommand</a></strong> ( <span style="color: #0000BB">$sql&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span>, <span style="color: #0000BB">$params&nbsp;</span><span style="color: #007700">=&nbsp;[]</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$sql</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The SQL statement to be executed</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$params</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.array">array</a></td>
                  <td class="param-desc-col"><p>The parameters to be bound to the SQL statement</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-sphinx-command.html">yii\sphinx\Command</a></td>
                  <td class="param-desc-col"><p>The Sphinx command</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="escapeMatchValue()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#escapeMatchValue()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L143" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L143" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        escapeMatchValue()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Escapes all special characters from 'MATCH' statement argument.</strong></p>

        <p>Make sure you are using this method whenever composing 'MATCH' search statement.
Note: this method does not perform quoting, you should place the result in the quotes
an perform additional escaping for it manually, the best way to do it is using PDO parameter.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-sphinx-connection.html#escapeMatchValue()-detail">escapeMatchValue</a></strong> ( <span style="color: #0000BB">$str</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$str</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>String to be escaped.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The properly escaped string.</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="getIndexSchema()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#getIndexSchema()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L80" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L80" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getIndexSchema()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Obtains the schema information for the named index.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="yii-sphinx-indexschema.html">yii\sphinx\IndexSchema</a></span> <strong><a href="yii-sphinx-connection.html#getIndexSchema()-detail">getIndexSchema</a></strong> ( <span style="color: #0000BB">$name</span>, <span style="color: #0000BB">$refresh&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Index name.</p>
</td>
                </tr>
                            <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$refresh</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.boolean">boolean</a></td>
                  <td class="param-desc-col"><p>Whether to reload the table schema even if it is found in the cache.</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="yii-sphinx-indexschema.html">yii\sphinx\IndexSchema</a></td>
                  <td class="param-desc-col"><p>Index schema information. Null if the named index does not exist.</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="getLastInsertID()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#getLastInsertID()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L130" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L130" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        getLastInsertID()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>This method is not supported by Sphinx.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-sphinx-connection.html#getLastInsertID()-detail">getLastInsertID</a></strong> ( <span style="color: #0000BB">$sequenceName&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$sequenceName</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Name of the sequence object</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The row ID of the last row inserted, or the last value retrieved from the sequence object</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">throws</th>
                  <td class="param-type-col"><a href="yii-base-notsupportedexception.html">yii\base\NotSupportedException</a></td>
                  <td class="param-desc-col"><p>always.</p>
</td>
                </tr>
                        </table>

<!--	-->

    <div class="detail-header h3" id="quoteIndexName()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#quoteIndexName()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L93" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L93" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        quoteIndexName()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Quotes a index name for use in a query.</strong></p>

        <p>If the index name contains schema prefix, the prefix will also be properly quoted.
If the index name is already quoted or contains special characters including '(', '[[' and '{{',
then this method will do nothing.</p>

            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-sphinx-connection.html#quoteIndexName()-detail">quoteIndexName</a></strong> ( <span style="color: #0000BB">$name</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Index name</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The properly quoted index name</p>
</td>
                </tr>
                                    </table>

<!--	-->

    <div class="detail-header h3" id="quoteTableName()-detail">
        <a href="#" class="tool-link" title="go to top"><span class="glyphicon glyphicon-arrow-up"></span></a>
        <a class="tool-link hash" href="yii-sphinx-connection.html#quoteTableName()-detail" title="direct link to this method"><span class="glyphicon icon-hash"></span></a>
                    <a href="https://github.com/yiisoft/yii2-sphinx/edit/master/Connection.php#L103" class="tool-link" title="edit on github"><span class="glyphicon glyphicon-pencil"></span></a>
            <a href="https://github.com/yiisoft/yii2-sphinx/blob/master/Connection.php#L103" class="tool-link" title="view source on github"><span class="glyphicon glyphicon-eye-open"></span></a>
        
        quoteTableName()
        <span class="detail-header-tag small">
            public                                    method
                    </span>
    </div>

    <div class="doc-description">
        <p><strong>Alias of <a href="yii-sphinx-connection.html#quoteIndexName()-detail">quoteIndexName()</a>.</strong></p>

        
            </div>

    <table class="detail-table table table-striped table-bordered table-hover">
        <tr><td colspan="3" class="signature"><span class="signature-defs">public</span> <span class="signature-type"><a href="http://www.php.net/language.types.string">string</a></span> <strong><a href="yii-sphinx-connection.html#quoteTableName()-detail">quoteTableName</a></strong> ( <span style="color: #0000BB">$name</span> )</td></tr>
                                    <tr>
                  <td class="param-name-col"><span style="color: #0000BB">$name</span></td>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>Table name</p>
</td>
                </tr>
                                        <tr>
                  <th class="param-name-col">return</th>
                  <td class="param-type-col"><a href="http://www.php.net/language.types.string">string</a></td>
                  <td class="param-desc-col"><p>The properly quoted table name</p>
</td>
                </tr>
                                    </table>

<!--	-->
</div>
        </div>
</div>

<script type="text/javascript">
    /*<![CDATA[*/
    $("a.toggle").on('click', function () {
        var $this = $(this);
        if ($this.hasClass('properties-hidden')) {
            $this.text($this.text().replace(/Show/,'Hide'));
            $this.parents(".summary").find(".inherited").show();
            $this.removeClass('properties-hidden');
        } else {
            $this.text($this.text().replace(/Hide/,'Show'));
            $this.parents(".summary").find(".inherited").hide();
            $this.addClass('properties-hidden');
        }

        return false;
    });
    /*
     $(".sourceCode a.show").toggle(function () {
     $(this).text($(this).text().replace(/show/,'hide'));
     $(this).parents(".sourceCode").find("div.code").show();
     },function () {
     $(this).text($(this).text().replace(/hide/,'show'));
     $(this).parents(".sourceCode").find("div.code").hide();
     });
     $("a.sourceLink").click(function () {
     $(this).attr('target','_blank');
     });
     */
    /*]]>*/
</script>


</div>

<footer class="footer">
        <p class="pull-right"><small>Page generated on Sat, 09 Jul 2016 12:15:58 +0000</small></p>
    Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a></footer>

<script type="text/javascript">jQuery(document).ready(function () {
    var shiftWindow = function () { scrollBy(0, -50) };
    if (location.hash) setTimeout(shiftWindow, 1);
    window.addEventListener("hashchange", shiftWindow);
var element = document.createElement("script");
element.src = "./jssearch.index.js";
document.body.appendChild(element);

var searchBox = $('#searchbox');

// search when typing in search field
searchBox.on("keyup", function(event) {
    var query = $(this).val();

    if (query == '' || event.which == 27) {
        $('#search-resultbox').hide();
        return;
    } else if (event.which == 13) {
        var selectedLink = $('#search-resultbox a.selected');
        if (selectedLink.length != 0) {
            document.location = selectedLink.attr('href');
            return;
        }
    } else if (event.which == 38 || event.which == 40) {
        $('#search-resultbox').show();

        var selected = $('#search-resultbox a.selected');
        if (selected.length == 0) {
            $('#search-results').find('a').first().addClass('selected');
        } else {
            var next;
            if (event.which == 40) {
                next = selected.parent().next().find('a').first();
            } else {
                next = selected.parent().prev().find('a').first();
            }
            if (next.length != 0) {
                var resultbox = $('#search-results');
                var position = next.position();

//              TODO scrolling is buggy and jumps around
//                resultbox.scrollTop(Math.floor(position.top));
//                console.log(position.top);

                selected.removeClass('selected');
                next.addClass('selected');
            }
        }

        return;
    }
    $('#search-resultbox').show();
    $('#search-results').html('<li><span class="no-results">No results</span></li>');

    var result = jssearch.search(query);

    if (result.length > 0) {
        var i = 0;
        var resHtml = '';

        for (var key in result) {
            if (i++ > 20) {
                break;
            }
            resHtml = resHtml +
            '<li><a href="' + result[key].file.u.substr(3) +'"><span class="title">' + result[key].file.t + '</span>' +
            '<span class="description">' + result[key].file.d + '</span></a></li>';
        }
        $('#search-results').html(resHtml);
    }
});

// hide the search results on ESC
$(document).on("keyup", function(event) { if (event.which == 27) { $('#search-resultbox').hide(); } });
// hide search results on click to document
$(document).bind('click', function (e) { $('#search-resultbox').hide(); });
// except the following:
searchBox.bind('click', function(e) { e.stopPropagation(); });
$('#search-resultbox').bind('click', function(e) { e.stopPropagation(); });

});</script></body>
</html>
